﻿<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="WebView_SSResourceManager.Register" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <fieldset class="profile">
        <legend>Profile Information</legend>
        <asp:Table ID="tblProfileInfo" runat="server">
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblUserName" runat="server" AssociatedControlID="txtUserName">Login:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:UpdatePanel ID="upUserName" runat="server">
                        <ContentTemplate>
                            <asp:TextBox ID="txtUserName" runat="server" TextMode="SingleLine" AutoPostBack="true"
                                OnTextChanged="txtUserName_LoginExist" CssClass="textEntry"></asp:TextBox>
                            <asp:Label ID="lblErrorMessage" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="txtUserName"
                                CssClass="failureNotification" ErrorMessage="Login is required." ToolTip="Login is required."
                                ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblEmail" runat="server" AssociatedControlID="txtEmail">E-mail:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtEmail" runat="server" CssClass="textEntry"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="txtEmail"
                        CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required."
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblPassword" runat="server" AssociatedControlID="txtPassword">Password:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="txtPassword"
                        CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required."
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblConfirmPassword" runat="server" AssociatedControlID="txtConfirmPassword">Confirm Password:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ControlToValidate="txtConfirmPassword" CssClass="failureNotification"
                        Display="Dynamic" ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired"
                        runat="server" ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="txtPassword"
                        ControlToValidate="txtConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                        ErrorMessage="The Password and Confirmation Password must match." ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblFirstName" runat="server" AssociatedControlID="txtFirstName">First Name:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtFirstName" runat="server" CssClass="textEntry"></asp:TextBox>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblLastName" runat="server" AssociatedControlID="txtLastName">Last Name:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtLastName" runat="server" CssClass="textEntry"></asp:TextBox>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblSkype" runat="server" AssociatedControlID="txtSkype">Skype:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtSkype" runat="server" CssClass="textEntry"></asp:TextBox>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableHeaderRow>
                <asp:TableHeaderCell HorizontalAlign="Right">
                    <asp:Label ID="lblMessageTimeSpan" runat="server" AssociatedControlID="txtMessageTimeSpan">MessageTimeSpan:</asp:Label>
                </asp:TableHeaderCell>
                <asp:TableHeaderCell HorizontalAlign="Left">
                    <asp:TextBox ID="txtMessageTimeSpan" runat="server" CssClass="textEntry"></asp:TextBox>
                </asp:TableHeaderCell>
            </asp:TableHeaderRow>
        </asp:Table>
        <p>
            <asp:Button ID="btnCreateUser" runat="server" Text="Create User" OnClick="btnCreateUser_RegisterUser" />
        </p>
        <p>
            <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
        </p>
    </fieldset>
</asp:Content>
